//导入Vue资源包
import Vue from 'vue'
//导入Router资源包
import VueRouter from "vue-router";
import Father from "@/components/Father";
import Son from "@/components/Son";
import Father2 from "@/components/Father2";
import Brother1 from "@/components/Brother1";
import Brother2 from "@/components/Brother2";
import Tab1 from "@/components/tab/Tab1";
import Tab2 from "@/components/tab/Tab2";
//把VueRouter安装到Vue实例上
Vue.use(VueRouter)
//创建Router的实例对象
const router = new VueRouter({
    routes:[
        {
            path:'/father',component:Father
        },
        {
            path: '/son',component: Son
        },
        {
            path: '/father2',component: Father2
        },
        {
            path: '/brother2',
            component: Brother2,
            children:[
                {path:'tab1',component:Tab1},
                {path: 'tab2',component: Tab2}
            ]
        }
    ]
})
//向外部共享路由的实例对象
export default router

